<template>
  <div class="flex justify-center items-start min-h-screen">
    <div v-if="loading" class="flex flex-col items-center space-y-2 pt-20">
      <span class="loading loading-infinity loading-lg text-primary"></span>
      <span class="text-gray-500">loading...</span>
    </div>
    <div v-else class="container mx-auto">
      <slot/>
    </div>
  </div>
</template>

<script setup lang="ts">
// 定义 props
defineProps({
  loading: {
    type: Boolean,
    default: true
  }
});
</script>
